export namespace="ddosify"
export app_name="ddosify"
export helm="ddosify/ddosify"
export repo="ddosify"
export url="https://ddosify.github.io/ddosify-helm-charts/"

# helm repo remove $repo
helm repo add $repo $url
helm repo update $repo

# helm search repo ddosify --devel --versions

helm upgrade --create-namespace --install \
    -n $namespace $app_name $helm \
    -f values.yaml

# LOCAL_PORT=8014
# kubectl port-forward --namespace ddosify service/nginx-service $LOCAL_PORT:80
# # 打开浏览器访问 http://localhost:8014/ 即可查看DDosify的Web界面

# # Replace <MONITORING_ID> with your monitoring ID from the Ddosify UI. Change XXXXX with your monitoring ID.
# MONITORING_ID=XXXXX
# # Set BACKEND_HOST with your Ddosify Self-Hosted Endpoint. If your Ddosify Self-Hosted endpoint is http://localhost:8014, then BACKEND_HOST=http://localhost:8014/api
# BACKEND_HOST=XXXXX

# helm upgrade --install --namespace ddosify alaz ddosify/alaz --set monitoringID=$MONITORING_ID --set backendHost=$BACKEND_HOST
